package com.neuedu.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

/**
 * 项目：      spring-framework
 * 类名:       MySimpleController
 * 创建时间：  2024/3/15 12：07
 * 描述 :
 * 作者 :     张金山
 * QQ :     314649444
 * Site:      https://jshand.gitee.io
 */
@Controller
public class MySimpleController implements org.springframework.web.servlet.mvc.Controller {
    /**
     *  http://localhost:8080/web/mySimpleController
     * @param request current HTTP request
     * @param response current HTTP response
     * @return
     * @throws Exception
     */
    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {

        System.out.println("后台 MySimpleController 执行");

        PrintWriter out = response.getWriter();
        out.write("MySimpleController");
        out.flush();
        out.close();


        return null;
    }
}
